package minidb.semantic;

import java.util.*;
import minidb.parse.exps.*;

public class TransactionChecker extends CheckerBase
{
	private TransactionExp transactionExp;
	private List<SQLExp> tr_exps; 
	
	public TransactionChecker(TransactionExp e)
	{
		this.transactionExp=e;
		this.tr_exps=e.tr_exps.GetSqlExpList();
	}
	
	
	@Override
	public Boolean DoSemanticCheck() throws SemanticException
	{
		List<SQLExp> temp=this.tr_exps;
		this.tr_exps=new ArrayList<SQLExp>();
		for(SQLExp exp:temp)
		{
			if(exp!=null)
			{
				SemanticChecker.DoSemanticCheck(exp);
				this.tr_exps.add(exp);
			}
		}
		this.transactionExp.tr_exps.sqlExpList=this.tr_exps;
		return true;
	}

}
